<!-- 电影列表 -->
<template>
  <div class='app-movieList'>
    <top-header></top-header>

    <div class="MovieList">
      <div class="MovieList-list">
        <div class="MovieList-list-left">电影列表</div>
        <div class="MovieList-list-right">
          <input placeholder="请输入关键字!">
          <div class="el-icon-search"></div>
        </div>
      </div>
      <el-table :data="movielist" style="width: 100%">
        <el-table-column prop="date" label="编号" width="80">
        </el-table-column>
        <el-table-column prop="name" label="片名" width="80">
        </el-table-column>
        <el-table-column prop="time" label="片长" width="100">
        </el-table-column>
        <el-table-column prop="label" label="标签" width="100">
        </el-table-column>
        <el-table-column prop="region" label="地区" width="120">
        </el-table-column>
        <el-table-column prop="star" label="星级" width="120">
        </el-table-column>
        <el-table-column prop="playnum" label="播放数量" width="100">
        </el-table-column>
        <el-table-column prop="cumnum" label="评论数量" width="100">
        </el-table-column>
        <el-table-column prop="retime" label="上映时间" width="100">
        </el-table-column>
        <el-table-column class="el-table-column-sx" prop="oitems" label="操作事项">
          <!-- <el-button type="primary">编辑</el-button> -->
          <!-- <el-button type="danger">删除</el-button> -->
          <el-button size="small" style="background:#409eff;color:white;">编辑</el-button>
          <el-button size="small" style="background:red;color:white;">删除</el-button>
        </el-table-column>
      </el-table>

    </div>

  </div>
</template>

<script>
//这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
//例如：import 《组件名称》 from '《组件路径》';
import TopHeader from './TopHeader'
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    'top-header': TopHeader,
  },
  data() {
    //这里存放数据
    return {
      movielist: [
        {
          date: '01',
          name: '飞猪',
          time: '120',
          label: '动作',
          region: '香港',
          star: '4.5',
          playnum: '666',
          cumnum: '133',
          retime: '2020-10-29',
          // oitems: '120',
        },
        {
          date: '02',
          name: '飞鹰',
          time: '120',
          label: '爱情',
          region: '香港',
          star: '4.5',
          playnum: '666',
          cumnum: '133',
          retime: '2020-10-29',
          // oitems: '120',
        },
        {
          date: '03',
          name: '僵尸大战植物',
          time: '3',
          label: '爱情/动作',
          region: '盐田',
          star: '4.5',
          playnum: '666',
          cumnum: '133',
          retime: '2020-10-29',
          // oitems: '120',
        },
      ],
    }
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {}, //如果页面有keep-alive缓存功能，这个函数会触发
}
</script>
<style lang="scss" scoped>
.MovieList {
  width: 100%;
  height: 100%;
  background-color: #fff;
  .MovieList-list {
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    border-top: 3px solid #3c8dbc;
    .MovieList-list-left {
      widows: 100%;
      height: 30px;
      line-height: 30px;
      margin: 2px 0 2px 10px;
    }

    .MovieList-list-right {
      widows: 100px;
      height: 20px;
      line-height: 30px;
      input {
      }

      .el-icon-search {
        font-size: 16px;
        line-height: 30px;
        position: relative;
        left: -25px;
      }
    }
    el-table {
      el-table-column {
      }

      el-table-column.el-table-column-sx {
        el-button {
        }
      }
    }
  }
}
</style>